package com.bwie.vo;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;


import java.util.Date;

/**
 * @author :Beyond🎸🎸
 * @date : 2025-10-30 14:47:55
 * @description es商品类
 **/
@Data
@Document(indexName = "es_prod",shards = 1,replicas = 1)
public class EsProdVo {
    /**
     * 主键
     */
    @Id
    @Field(type = FieldType.Long)
    private Integer prodId;

    /**
     * 商品spu
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String prodSpu;

    /**
     * 商品分类
     */
    @Field(type = FieldType.Long)
    private Integer prodType;

    /**
     * 商品类型
     */
    @Field(type = FieldType.Long)
    private Integer prodKind;

    /**
     * 商品名称
     */
    @Field(type=FieldType.Text,analyzer = "ik_max_word")
    private String prodName;

    /**
     * 商品品牌
     */

    @Field(type = FieldType.Long)
    private Integer prodBrand;

    /**
     * 商品单位
     */
    @Field(type = FieldType.Long)
    private Integer unitId;

    /**
     * 商品标签
     */
    @Field(type = FieldType.Long)
    private Integer tagId;

    /**
     * 供应商
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String supplier;

    /**
     * 缩略图
     */
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String prodImage;

    /**
     * 商品状态
     */
    @Field(type = FieldType.Long)
    private Integer prodStatus;

    /**
     * 创建人
     */
    @Field(type = FieldType.Long)
    private Integer createBy;

    /**
     * 创建时间
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 更新人
     */
    @Field(type = FieldType.Long)
    private Integer updateBy;

    /**
     * 更新时间
     */
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    /**
     * 删除标识
     */
    @Field(type = FieldType.Long)
    private Integer deleteFlag;

    /**
     * 删除时间
     */
    @Field(type=FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd HH:mm:ss")
    private Date deleteTime;
    private static final long serialVersionUID = 1L;

}
